package cEvent

import (
	"gitee.com/csingo/cComponents"
)

type EventComponent struct{}

func (i *EventComponent) Inject(instance any) bool {
	if container.Is(instance) {
		return container.Save(instance)
	}

	return false
}

func (i *EventComponent) InjectConf(config cComponents.ConfigInterface) bool {
	if config.ConfigName() == EventConfigName {
		event_config = config.(*EventConf)
		return true
	}

	return false
}

func (i *EventComponent) Load() {
	run()
}

func (i *EventComponent) Listen() []*cComponents.ConfigListener {
	return []*cComponents.ConfigListener{}
}

var Component = &EventComponent{}
